4cf397a9624568dfb298bde70b8f87d9850ad254,geopackage-sdk/src/main/java/mil/nga/geopackage/tiles/TileGenerator.java,TileGenerator,updateTileBounds,#TileMatrixSet#,555
Before Change
ProjectionTransform transformContentsToWgs84 = ProjectionFactory.getProjection(
contents.getSrs())
.getTransformation(
ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM);
// Combine the existing content and request bounding boxes
BoundingBox contentsBoundingBox = transformContentsToWgs84.transform(contents
.getBoundingBox());
boundingBox = TileBoundingBoxUtils.union(contentsBoundingBox,
boundingBox);
// Update the contents if modified
if (!contentsBoundingBox.equals(boundingBox)) {
ProjectionTransform transformContentsToProjection = ProjectionFactory
.getProjection(ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM)
.getTransformation(
contents.getSrs());
contents.setBoundingBox(transformContentsToProjection
.transform(boundingBox));
After Change
}
Projection tileMatrixProjection = ProjectionFactory.getProjection(tileMatrixSet.getSrs());
if (tileMatrixProjection.getEpsg() != projection.getEpsg()) {
throw new GeoPackageException("Can not update tiles projected at "
+ tileMatrixProjection.getEpsg() + " with tiles projected at " + projection.getEpsg());
}
Contents contents = tileMatrixSet.getContents();
// Combine the existing content and request bounding boxes
BoundingBox previousContentsBoundingBox = contents.getBoundingBox();
ProjectionTransform transformProjectionToContents = projection.getTransformation(ProjectionFactory.getProjection(contents.getSrs()));
BoundingBox contentsBoundingBox = transformProjectionToContents.transform(boundingBox);
contentsBoundingBox = TileBoundingBoxUtils.union(contentsBoundingBox, previousContentsBoundingBox);